

package com.hazelcast.nio.serialization.compatibility;

import com.hazelcast.nio.serialization.Portable;
import com.hazelcast.nio.serialization.PortableFactory;

public class APortableFactory implements PortableFactory {

    public static int FACTORY_ID = ReferenceObjects.PORTABLE_FACTORY_ID;

    @Override
    public Portable create(int classId) {
        if (classId == ReferenceObjects.PORTABLE_CLASS_ID) {
            return new APortable();
        } else
            if (classId == ReferenceObjects.INNER_PORTABLE_CLASS_ID) {
                return new AnInnerPortable();
            }
        return null;
    }
}
